"use strict";
function argumentss(x, y, ...args) {
    const arr = [];
    args.forEach((item) => {
        arr.push(item);
    });
    return arr;
}
console.log(argumentss("", "", 1, 23, 4, 66, 5, 2, 2, 5));
function sums(arr) {
    let sum = 0;
    for (const key of arr) {
        sum += key;
    }
    return sum;
}
console.log(sums([...[1, 2, 3], ...[4, 5, 6]]));
function makeDate(timeStamp, y, m, d) {
    if (m !== undefined && d !== undefined) {
        return new Date(timeStamp, m, d);
    }
    else {
        console.log(timeStamp, y);
    }
    return new Date(timeStamp);
}
makeDate(123456789);
makeDate(5, 6, 7);
makeDate(123456789, 7);
function add(a, b) {
    return a + b;
}
add(2, 2);
add("2", "2");
add("2", 2);
add(2, "2");
